/**
 * video player
 * Copyright (c) 2009 cmiscm.com
 * date of final modification : 2009. 11. 20 
*/




package com.cmiscm.videos
{
	import com.cmiscm.videos.stream.CMprogress;
	import com.cmiscm.videos.stream.CMsound;
	import com.cmiscm.videos.stream.CMstream;
	
	import flash.display.Sprite;
	import flash.media.Video;
	import flash.net.NetStream;
	
	[Event(name="change_mode", type="com.cmiscm.videos.events.VideoEvent")]
	[Event(name="add_buffer", type="com.cmiscm.videos.events.VideoEvent")]
	[Event(name="remove_buffer", type="com.cmiscm.videos.events.VideoEvent")]
	[Event(name="start_video", type="com.cmiscm.videos.events.VideoEvent")]
	[Event(name="finish_video", type="com.cmiscm.videos.events.VideoEvent")]
	[Event(name="error_video", type="com.cmiscm.videos.events.VideoEvent")]
	
	[Event(name="change_precent", type="com.cmiscm.videos.events.VideoProgressEvent")]
	
	[Event(name="change_time", type="com.cmiscm.videos.events.VideoTimeEvent")]
	
	[Event(name="finish_buffer_load", type="com.cmiscm.videos.events.VideoBufferLoadEvent")]
	[Event(name="buffer_precent", type="com.cmiscm.videos.events.VideoBufferLoadEvent")]
	[Event(name="complete_duration", type="com.cmiscm.videos.events.VideoBufferLoadEvent")]
	
	[Event(name="change_volume", type="com.cmiscm.videos.events.VideoSoundEvent")]
	
	/**
	 * Video Player.
	 *  
	 * @example
     * <listing>
     * package {
     *    import com.cmiscm.videos.VideoPlayer;
     *    import com.cmiscm.videos.events.VideoEvent;
     *    import com.cmiscm.videos.events.VideoProgressEvent;
     *    import flash.display.Sprite;
     *    import flash.events.Event;
     *    import flash.media.Video;
     * 
     *    public class TestVideo extends Sprite
     *    {
     *        private var _player:VideoPlayer;
     *        
     *        public function TestVideo()
     *        {
     *            super();
     *            this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
     *        }
     * 
     *        private function onAdd(evt:Event):void
     *        {
     *            evt.currentTarget.removeEventListener(evt.type, arguments.callee);
     *            
     *            _player = new VideoPlayer();
     * 
     *            _player.addEventListener(VideoEvent.ADD_BUFFER, onAddBuffer);
     *            _player.addEventListener(VideoEvent.REMOVE_BUFFER, onRemoveBuffer);
     *            _player.addEventListener(VideoEvent.CHANGE_MODE, onChangeMode);
     *            _player.addEventListener(VideoEvent.ERROR_VIDEO, onErrorVideo);
     *            _player.addEventListener(VideoEvent.START_VIDEO, onStartVideo);
     *            _player.addEventListener(VideoEvent.FINISH_VIDEO, onFinishVideo);
     *            _player.addEventListener(VideoProgressEvent.CHANGE_PRECENT, onChangeProgress);
     * 
     *            // connect 
     *            _player.connect(new Video(500, 300));
     *            this.addChild(_player.video); 
     * 
     *            // setting movie URL
     *            _player.setUrl("intro.flv");
     * 
     *            // play
     *            _player.play();
     *        }
     * 
     *        private function onAddBuffer(evt:VideoEvent):void
     *        {
     *            trace("add buffer");
     *        }
     * 
     *        private function onRemoveBuffer(evt:VideoEvent):void
     *        {
     *            trace("remove buffer");
     *        }
     * 
     *        private function onChangeMode(evt:VideoEvent):void
     *        {
     *            trace("change mode : ", evt.mode, "0:play / 1:pause / 2:stop / 3:init");
     *        }
     * 
     *        private function onErrorVideo(evt:VideoEvent):void
     *        {
     *            trace("video error");
     *        }
     * 
     *        private function onStartVideo(evt:VideoEvent):void
     *        {
     *            trace("video start");
     *        }
     * 
     *        private function onFinishVideo(evt:VideoEvent):void
     *        {
     *            trace("video finish");
     *        }
     * 
     *        private function onChangeProgress(evt:VideoEvent):void
     *        {
     *            trace(evt.buffer, evt.progress);
     *        }
     *    }
     * }
     * </listing> 
	 * 
	 * @see com.cmiscm.videos.stream.CMbufferload CMbufferload
	 * @see com.cmiscm.videos.stream.CMinfo CMinfo
	 * @see com.cmiscm.videos.stream.CMprogress CMprogress
	 * @see com.cmiscm.videos.stream.CMsound CMsound
	 * @see com.cmiscm.videos.stream.CMstream CMstream
	 * @see com.cmiscm.videos.events.VideoBufferLoadEvent VideoBufferLoadEvent
	 * @see com.cmiscm.videos.events.VideoEvent VideoEvent
	 * @see com.cmiscm.videos.events.VideoProgressEvent VideoProgressEvent
	 * @see com.cmiscm.videos.events.VideoSoundEvent VideoSoundEvent
	 * @see com.cmiscm.videos.events.VideoTimeEvent VideoTimeEvent
	 */
	public class VideoPlayer extends CMstream
	{
		/**
		 * Mode Play 
		 */		
		public static const MODE_PLAY:int = 0;
		
		/**
		 * Mode Pause 
		 */		
		public static const MODE_PAUSE:int = 1;
		
		/**
		 * Mode Stop 
		 */		
		public static const MODE_STOP:int = 2;
		
		/**
		 * Mode Init 
		 */		
		public static const MODE_INIT:int = 3;
		
		public function VideoPlayer()
		{
			super();
		}
		
		/**
		 * Get Video 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		public function get video():Video
		{
			return super._video;
		}
		
		/**
		 * Get Sync Video 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		public function get syncVideo():Video
		{
			return super._syncVideo;
		}
		
		/**
		 * Get Buffer Video 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMbufferload CMbufferload
		 */			
		public function get bufferVideo():Video
		{
			return super._buffer.video;
		}
				
		/**
		 * Get Current Mode 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function get curmode():int
		{
			return super.curmode;
		}
		
		/**
		 * Get Stream 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function get stream():NetStream
		{
			return super.stream;
		}
		
		/**
		 * Get Duration 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function get duration():Number
		{
			return super.duration;
		}
		
		/**
		 * Connect 
		 * @param $video Video
		 * @param $command Command
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function connect($video:Video, $command:String=null):void
		{
			super.connect($video, $command);
		}
		
		/**
		 * Add Sync
		 * @param $video Sync Video
		 * 
		 * @example
	     * <listing>
	     * package {
	     *    import com.cmiscm.videos.VideoPlayer;
	     *    import flash.display.Sprite;
	     *    import flash.events.Event;
	     *    import flash.media.Video;
	     * 
	     *    public class TestVideo extends Sprite
	     *    {
	     *        private var _player:VideoPlayer;
	     *        
	     *        public function TestVideo()
	     *        {
	     *            super();
	     *            this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
	     *        }
	     * 
	     *        private function onAdd(evt:Event):void
	     *        {
	     *            evt.currentTarget.removeEventListener(evt.type, arguments.callee);
	     *            
	     *            _player = new VideoPlayer();
	     * 
	     *            // connect 
	     *            _player.connect(new Video(500, 300));
	     *            this.addChild(_player.video); 
	     * 
	     *            // sync
	     *            _player.addSync(new Video(500, 300));
	     *            this.addChild(_player.syncVideo);
	     *            _player.syncUrl("movie_0.flv", "movie_1.flv", 5, false, false);
	     * 
	     *            // play
	     *            _player.play();
	     *        }
	     *    }
	     * }
	     * </listing> 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function addSync($video:Video):void
		{
			super.addSync($video);
		}
		
		
		/**
		 * Setting Movie URL 
		 * @param $url URL
		 * @param $buffer_time Buffer Time
		 * @param $cache Cache
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */				
		override public function setUrl($url:String, $buffer_time:int=5, $cache:Boolean=false):void
		{			
			super.setUrl($url, $buffer_time, $cache);						
		}
		
		/**
		 * Setting Sync Movie URL 
		 * @param $url URL
		 * @param $sync_url Sync URL
		 * @param $buffer_time Buffer Time
		 * @param $cache Cache
		 * @param $sync_cache Sync Cache
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */				
		override public function syncUrl($url:String, $sync_url:String, $buffer_time:int=5, $cache:Boolean=false, $sync_cache:Boolean=false):void
		{			
			super.syncUrl($url, $sync_url, $buffer_time, $cache, $sync_cache);						
		}
		
		
		/**
		 * Destroy 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function destroy():void
		{
			super.destroy();
		}
		
		/**
		 * Clear 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function clear():void
		{
			super.clear();
		}
		
		
		/**
		 * Play 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */			
		override public function play():void
		{
			super.play();
		}
		
		/**
		 * Pause 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */		
		override public function pause():void
		{
			super.pause();
		}
		
		/**
		 * Stop 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */		
		override public function stop():void
		{
			super.stop();
		}
		
		/**
		 * Seek 
		 * @param $no Seek Time
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 */		
		override public function seek($no:Number):void
		{
			super.seek($no);
		}
		
		
		/**
		 * Add Buffer Load 
		 * @param $video Video
		 * 
		 * @example
	     * <listing>
	     * package {
	     *    import com.cmiscm.videos.VideoPlayer;
	     *    import com.cmiscm.videos.events.VideoBufferLoadEvent;
	     *    import flash.display.Sprite;
	     *    import flash.events.Event;
	     *    import flash.media.Video;
	     * 
	     *    public class TestVideo extends Sprite
	     *    {
	     *        private var _player:VideoPlayer;
	     *        
	     *        public function TestVideo()
	     *        {
	     *            super();
	     *            this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
	     *        }
	     * 
	     *        private function onAdd(evt:Event):void
	     *        {
	     *            evt.currentTarget.removeEventListener(evt.type, arguments.callee);
	     *            
	     *            _player = new VideoPlayer();
	     * 
	     *            _player.addEventListener(VideoBufferLoadEvent.BUFFER_PRECENT, onBufferPercent); 
	     *            _player.addEventListener(VideoBufferLoadEvent.FINISH_BUFFER_LOAD, onFinishBufferLoad);
	     *            _player.addEventListener(VideoBufferLoadEvent.COMPLETE_DURATION, onCompleteDuration); 
	     * 
	     *            // add buffer load 
	     *            _player.addBufferLoad(new Video(100, 100));
	     *            this.addChild(_player.bufferVideo);
	     * 
	     *            // load
	     *            _player.bufferLoad("movie.flv");
	     *        }
	     * 
	     *        private function onBufferPercent(evt:VideoBufferLoadEvent):void
	     *        {
	     *            trace(evt.percent);
	     *        }
	     * 
	     *        private function onFinishBufferLoad(evt:VideoBufferLoadEvent):void
	     *        {
	     *            trace("finish buffer load");
	     * 
	     *            _player.destroyBufferLoad();
	     *            _player.removeEventListener(VideoBufferLoadEvent.BUFFER_PRECENT, onBufferPercent);
	     *            _player.removeEventListener(VideoBufferLoadEvent.FINISH_BUFFER_LOAD, onFinishBufferLoad);
	     *            _player.removeEventListener(VideoBufferLoadEvent.COMPLETE_DURATION, onCompleteDuration);
	     *            this.removeChild(_player.bufferVideo);
	     *        }
	     * 
	     *        private function onCompleteDuration(evt:VideoBufferLoadEvent):void
	     *        {
	     *            trace(evt.duration);
	     *        }
	     *    }
	     * }
	     * </listing> 
	     * 
	     * @see com.cmiscm.videos.stream.CMstream CMstream
	     * @see com.cmiscm.videos.stream.CMbufferload CMbufferload
	     * @see com.cmiscm.videos.events.VideoBufferLoadEvent VideoBufferLoadEvent
		 */						
		override public function addBufferLoad($video:Video):void
		{
			super.addBufferLoad($video);
		}
		
		/**
		 * Start Buffer Load
		 * @param $url
		 * @param $cache
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMbufferload CMbufferload
		 */			
		override public function bufferLoad($url:String, $cache:Boolean=false):void
		{
			super.bufferLoad($url, $cache);
		}
		
		/**
		 * Destroy Buffer Load 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMbufferload CMbufferload
		 */			
		override public function destroyBufferLoad():void
		{
			super.destroyBufferLoad();
		}
			
		
		/**
		 * Add Default Progress Bar
		 * @param $tW Progress Bar Width
		 * @param $tH Progress Bar height
		 * @param $progress_color Progress Bar Color
		 * @param $buffer_color Progress Buffer Color
		 * @param $bg_color Progress BG Color
		 * @param $be_control Progress Control
		 * @param $control_tY Progress Control Button Y Position
		 * @param $control_tH Progress Control Button Height
		 * @param $be_hand Progress Control Button Hand
		 * @param $buffer_limit Progress Control Limit Gap
		 * 
		 * @example
	     * <listing>
	     * package {
	     *    import com.cmiscm.videos.VideoPlayer;
	     *    import flash.display.Sprite;
	     *    import flash.events.Event;
	     *    import flash.media.Video;
	     * 
	     *    public class TestVideo extends Sprite
	     *    {
	     *        private var _player:VideoPlayer;
	     *        
	     *        public function TestVideo()
	     *        {
	     *            super();
	     *            this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
	     *        }
	     * 
	     *        private function onAdd(evt:Event):void
	     *        {
	     *            evt.currentTarget.removeEventListener(evt.type, arguments.callee);
	     *            
	     *            _player = new VideoPlayer();
	     * 
	     *            // connect  
	     *            _player.connect(new Video(500, 300));
	     *            this.addChild(_player.video);  
	     * 
	     *            // setting movie URL
	     *            _player.setUrl("intro.flv");
	     * 
	     *            // make progress bar
	     *            _player.addDefaultProgressBar(500, 2, 0xff0000, 0x00ff00, 0xbbbbbb, true, -5, 10, true, 20);
	     *            _player.defaultProgress.stage = this.stage;
	     *            this.addChild(_player.defaultProgress);
	     *        }
	     *    }
	     * }
	     * </listing> 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMprogress CMprogress
		 */			
		override public function addDefaultProgressBar($tW:int, $tH:int, $progress_color:uint, $buffer_color:uint, $bg_color:uint, $be_control:Boolean=false, $control_tY:int=0, $control_tH:int=0, $be_hand:Boolean=false, $buffer_limit:int=0):void
		{
			super.addDefaultProgressBar($tW, $tH, $progress_color, $buffer_color, $bg_color, $be_control, $control_tY, $control_tH, $be_hand, $buffer_limit);	
		}
		
		/**
		 * Get Default Progress 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMprogress CMprogress
		 */			
		public function get defaultProgress():CMprogress
		{
			if (super._progress == null) {
				throw Error("you must addDefaultProgress first");
			} else {
				return super._progress;
			}
		}
		
		
		/**
		 * Add Info 
		 * 
		 * @example
	     * <listing>
	     * package {
	     *    import com.cmiscm.videos.VideoPlayer;
	     *    import com.cmiscm.videos.events.VideoTimeEvent;
	     *    import flash.display.Sprite;
	     *    import flash.events.Event;
	     *    import flash.media.Video;
	     * 
	     *    public class TestVideo extends Sprite
	     *    {
	     *        private var _player:VideoPlayer;
	     *        
	     *        public function TestVideo()
	     *        {
	     *            super();
	     *            this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
	     *        }
	     * 
	     *        private function onAdd(evt:Event):void
	     *        {
	     *            evt.currentTarget.removeEventListener(evt.type, arguments.callee);
	     *            
	     *            _player = new VideoPlayer();
	     * 
	     *            // connect  
	     *            _player.connect(new Video(500, 300));
	     *            this.addChild(_player.video); 
	     * 
	     *            // setting movie URL
	     *            _player.setUrl("intro.flv");
	     * 
	     *            // add info
	     *            _player.addInfo();
	     *            _player.addEventListener(VideoTimeEvent.CHANGE_TIME, onChangeTime);
	     * 
	     *            // debug info 
	     *            this.addChild(_player.getDebugInfo);
	     *        }
	     * 
	     *        private function onChangeTime(evt:VideoTimeEvent):void
	     *        {
	     *            trace(evt.realTime, evt.totalMin, evt.totalSec, evt.curMin, evt.curSec);
	     *        }
	     *    }
	     * }
	     * </listing> 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMinfo CMinfo
		 * @see com.cmiscm.videos.events.VideoTimeEvent VideoTimeEvent
		 */
		override public function addInfo():void
		{
			super.addInfo();
		}
		
		/**
		 * Get Debug Info 
		 * @return 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMinfo CMinfo
		 */			
		override public function get getDebugInfo():Sprite
		{
			return super.getDebugInfo;
		}
		
		
		/**
		 * Add Sound Control 
		 * @param $first_volume First Volume
		 * @param $cookie Cookie
		 * 
		 * @example
	     * <listing>
	     * package {
	     *    import com.cmiscm.videos.VideoPlayer;
	     *    import com.cmiscm.videos.events.VideoSoundEvent;
	     *    import flash.display.Sprite;
	     *    import flash.events.Event;
	     *    import flash.events.MouseEvent;
	     *    import flash.media.Video;
	     *    import com.cmiscm.utils.common.NumberUtilities;
	     *    import com.cmiscm.utils.display.MakeButton;
	     * 
	     *    public class TestVideo extends Sprite
	     *    {
	     *        private var _player:VideoPlayer;
	     *        private var _soundControl:Sprite = new Sprite();
	     *        private var _soundBar:Sprite = new Sprite();
	     *        private var _soundButton:MakeButton;
	     *        
	     *        public function TestVideo()
	     *        {
	     *            super();
	     *            this.addEventListener(Event.ADDED_TO_STAGE, onAdd);
	     *        }
	     * 
	     *        private function onAdd(evt:Event):void
	     *        {
	     *            evt.currentTarget.removeEventListener(evt.type, arguments.callee);
	     *            
	     *            _player = new VideoPlayer();
	     * 
	     *            // connect  
	     *            _player.connect(new Video(500, 300));
	     *            this.addChild(_player.video); 
	     * 
	     *            // add sound
	     *            _player.addEventListener(VideoSoundEvent.CHANGE_VOLUME, onChangeVolume);
	     *            _player.addSoundControl(0.7, false);
	     * 
	     *            // setting movie URL
	     *            _player.setUrl("intro.flv");
	     *            _player.play();
	     * 
	     *            // make button
	     *            _soundBar.graphics.beginFill(0xff0000);
	     *            _soundBar.graphics.drawRect(0, 0, 100, 1);
	     *            _soundBar.graphics.endFill();	
	     *            _soundControl.addChild(_soundBar);
	     * 
	     *            _soundButton = new MakeButton(100, 20);
	     *            _soundButton.y = -10;
	     *            _soundButton.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
	     *            _soundControl.addChild(_soundButton);
	     *            _soundControl.x = _soundControl.y = 100;
	     *            this.addChild(_soundControl);
	     *        }
	     * 
	     *        private function onChangeVolume(evt:VideoSoundEvent):void
	     *        {
	     *            trace("volume", evt.volume);
	     *            _soundBar.scaleX = evt.volume;
	     *        }
	     * 
	     *        private function onDown(evt:MouseEvent):void
	     *        {
	     *            _soundButton.addEventListener(Event.ENTER_FRAME, onEnter);
	     *            _soundButton.addEventListener(MouseEvent.MOUSE_UP, onUp);
	     *        }
	     * 
	     *        private function onUp(evt:MouseEvent):void
	     *        {
	     *            _soundButton.removeEventListener(Event.ENTER_FRAME, onEnter);
	     *            _soundButton.removeEventListener(MouseEvent.MOUSE_UP, onUp);
	     *        }
	     * 
	     *        private function onEnter(evt:Event):void
	     *        {
	     *            var volume:Number = NumberUtilities.getCurrent(_soundButton.mouseX, 0, _soundButton.width, 0, 1);
	     *            if (volume < 0) volume = 0;
	     *            else if (volume > 1) volume = 1;
	     * 
	     *            // direct change volume
	     *            _player.changeVolume(volume);
	     * 
	     *            // easing change volume
	     *            TweenLite.to(_player.stream, 1, {volume:volume});
	     *            _player.setVolume(volume);
	     *        }
	     *    }
	     * }
	     * </listing> 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMsound CMsound
		 * @see com.cmiscm.videos.events.VideoSoundEvent VideoSoundEvent
		 */			
		override public function addSoundControl($first_volume:Number, $cookie:Boolean):void
		{
			super.addSoundControl($first_volume, $cookie);
		}
		
		/**
		 * Change Volume 
		 * @param $volume Volume
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMsound CMsound
		 */		
		override public function changeVolume($volume:Number):void
		{
			super.changeVolume($volume);
		}
		
		/**
		 * Set Volume 
		 * @param $volume Volume
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMsound CMsound
		 */			
		override public function setVolume($volume:Number):void
		{
			super.setVolume($volume);
		}
		
		/**
		 * Mute 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMsound CMsound
		 */			
		override public function mute():void
		{
			super.mute();
		}
		
		/**
		 * Sound On 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMsound CMsound
		 */			
		override public function soundOn():void
		{
			super.soundOn();
		}
		
		/**
		 * Sound Off 
		 * 
		 * @see com.cmiscm.videos.stream.CMstream CMstream
		 * @see com.cmiscm.videos.stream.CMsound CMsound
		 */			
		override public function soundOff():void
		{
			super.soundOff();
		}
	}
}